package com.system.userserver.service;

import com.system.commonutils.bean.ApiResult;
import com.system.userserver.bean.UserParams;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 调用授权服务器
 */
@FeignClient(value = "OAUTHSERVER")
public interface OauthService {

    /**
     * 调授权服务的登录接口
     * @return
     */
    @RequestMapping(value = "auth/login",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    String login(@RequestParam("username")String username,@RequestParam("password") String password);

    /**
     * 测试调用授权服务接口
     * @return
     */
    @RequestMapping(value = "test/hello",method = RequestMethod.GET,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    String hello(@RequestParam("test") String test);

    /**
     * 测试调用授权服务接口
     * @return
     */
    @RequestMapping(value = "test/hello2",method = RequestMethod.GET,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    String hello2();
}
